<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

	<!-- 数据库应用 -->
	<bean id="${model.initUpperName}Dao" class="${model.packageName}.dao.ibatis.${model.initUpperName}DaoImpl">	
		<property name="sqlMapClient" ref="sqlMapClient_${model.initLowerName}"/>	
	</bean>	
	<#list model.childModels as childModel>
	<bean id="${childModel.initUpperName}Dao" class="${model.packageName}.dao.ibatis.${childModel.initUpperName}DaoImpl">	
		<property name="sqlMapClient" ref="sqlMapClient_${model.initLowerName}"/>	
	</bean>	
	</#list>
	
	<!-- sqlMapConfig.xml -->
	<bean id="sqlMapClient_${model.initLowerName}" class="com.dhc.framework.ext.spring.ExtSqlMapClientFactoryBean">
		<property name="configLocation">
			<value>classpath:${model.packageName?replace(".", "/")}/conf/sql-map-config-${model.initLowerName}.xml</value>
		</property>	
		<property name="dataSource" ref="dataSource"></property>		
	</bean>	
</beans>